package com.jinduplan.planmanager.bean

import android.annotation.SuppressLint
import android.os.Parcel
import android.os.Parcelable
import com.cxz.kotlin.baselibs.bean.BaseBean
import com.squareup.moshi.Json
import androidx.annotation.Keep
import com.cxz.kotlin.baselibs.bean.CurrentBean
import com.cxz.kotlin.baselibs.bean.ListDataBean

import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize


/**
 * @author admin
 * @date 2018/11/21
 * @desc
 */

//data class HttpResult<T>(
//    @Json(name = "data") val data: T,
//    @Json(name = "errorCode") val errorCode: Int,
//    @Json(name = "errorMsg") val errorMsg: String
//)

data class HttpResult<T>(
    @Json(name = "data") val data: T,
//    @Json(name = "current") val current: CurrentBean? = null,
//    @Json(name = "map") val map: ListDataBean? = null
) : BaseBean()

data class HttpListResult<T>(
    @Json(name = "data") val data: ArrayList<T>,
) : BaseBean()

data class BuildingNameBean(
    @Json(name = "data") val data: ArrayList<BuildingsBean>
)
data class BuildingsBean(
    @Json(name = "data") val building_name: String,
    @Json(name = "isSelect") val isSelect: Boolean,
    @Json(name = "id") val id: String
)
data class WeatherBean(
    @Json(name = "now") val now: WeatherNowBean,
    @Json(name = "forecasts") val forecasts: ArrayList<WeatherForecastBean>
)

data class WeatherNowBean(
    @Json(name = "text") val text: String,
    @Json(name = "temp") val temp: String,
    @Json(name = "feels_like") val feels_like: String,
    @Json(name = "rh") val rh: String,
    @Json(name = "wind_class") val wind_class: String,
    @Json(name = "wind_dir") val wind_dir: String,
    @Json(name = "uptime") val forecasts: String
)

data class WeatherForecastBean(
    @Json(name = "text_day") val text_day: String,
    @Json(name = "text_night") val text_night: String,
    @Json(name = "high") val high: String,
    @Json(name = "low") val low: String,
    @Json(name = "wc_day") val wc_day: String,
    @Json(name = "wd_day") val wd_day: String,
    @Json(name = "wc_night") val wc_night: String,
    @Json(name = "wd_night") val wd_night: String,
    @Json(name = "date") val date: String,
    @Json(name = "week") val week: String
)

data class WeatherIpBean(
    @Json(name = "address") val address: String,
    @Json(name = "content") val content: WeatherIpContentBean,
    @Json(name = "status") val status: String
)

data class WeatherIpContentBean(
    @Json(name = "address") val address: String,
    @Json(name = "address_detail") val address_detail: WeatherIpAddressDetailtBean
)

data class WeatherIpAddressDetailtBean(
    @Json(name = "adcode") val adcode: String,
    @Json(name = "city") val city: String,
    @Json(name = "city_code") val city_code: String,
    @Json(name = "district") val district: String,
    @Json(name = "province") val province: String,
    @Json(name = "street") val street: String,
    @Json(name = "street_number") val point: String
)

data class ClockinRecord(
    @Json(name = "total") val id: Int,
    @Json(name = "per_page") val per_page: Int,
    @Json(name = "current_page") val current_page: Int,
    @Json(name = "last_page") val last_page: Int,
    @Json(name = "data") val data: ArrayList<ClockinRecordData>
)

data class ReportListRecord(
    @Json(name = "total") val total: Int,
    @Json(name = "per_page") val per_page: Int,
    @Json(name = "current_page") val current_page: Int,
    @Json(name = "last_page") val last_page: Int,
    @Json(name = "data") val data: ArrayList<ReportListData>
)

data class ReportListData(
    @Json(name = "id") val id: String,
    @Json(name = "full_name") val full_name: String,
    @Json(name = "content") val content: String,
    @Json(name = "position") val position: String,
    @Json(name = "created_id") val created_id: String,
    @Json(name = "created_at") val created_at: String,
    @Json(name = "updated_at") val updated_at: String,
    @Json(name = "id") val images: ArrayList<String>
)

data class ReportDetailData(
    @Json(name = "id") val id: String,
    @Json(name = "full_name") val full_name: String,
    @Json(name = "content") val content: String,
    @Json(name = "position") val position: String,
    @Json(name = "created_id") val created_id: String,
    @Json(name = "created_at") val created_at: String,
    @Json(name = "updated_at") val updated_at: String,
    @Json(name = "type") val type: String,
    @Json(name = "images") val images: ArrayList<String>
)


data class ClockinListData(
    @Json(name = "date") val date: String,
    @Json(name = "detaiList") val detaiList: ArrayList<ClockinDetailData>
)

data class ClockinDetailData(
    @Json(name = "time") val time: String,
    @Json(name = "addr") val addr: String
)

data class ClockinRecordData(
    @Json(name = "id") val id: String,
    @Json(name = "project_id") val project_id: String,
    @Json(name = "images") val images: String,
    @Json(name = "created_id") val created_id: String,
    @Json(name = "updated_id") val updated_id: String,
    @Json(name = "created_at") val created_at: String,
    @Json(name = "updated_at") val updated_at: String,
    @Json(name = "lat") val lat: String,
    @Json(name = "lon") val lon: String,
    @Json(name = "project") val project: Project,
    @Json(name = "building") val building: Building
)

data class Building(
    @Json(name = "id") val id: String,
    @Json(name = "building_name") val building_name: String,
)
data class Project(
    @Json(name = "id") val project_id: String,
    @Json(name = "project_name") val project_name: String,
    @Json(name = "project_addr") val project_addr: String
)

data class UploadProjectLocation(
    @Json(name = "project_id") val project_id: String,
    @Json(name = "addr_name") val addr_name: String,
    @Json(name = "address") val address: String,
    @Json(name = "lat") val lat: String,
    @Json(name = "lon") val lon: String,
    @Json(name = "created_id") val created_id: String,
    @Json(name = "updated_id") val updated_id: String,
    @Json(name = "created_at") val created_at: String,
    @Json(name = "updated_at") val updated_at: String,
    @Json(name = "id") val id: String
)

data class PersonalModifyBean(
    @Json(name = "avatar") val avatar: String,
    @Json(name = "nick_name") val nick_name: String,
    @Json(name = "id") val id: String
)

data class PicUploadSuccess(
    @Json(name = "images") val images: String
)
data class PicSignSuccess(
    @Json(name = "signature") val signature: String
)

data class ClockinSuccess(
    @Json(name = "images") val images: String,
    @Json(name = "project_id") val project_id: String,
    @Json(name = "lon") val lon: String,
    @Json(name = "lat") val lat: String,
    @Json(name = "created_id") val created_id: String,
    @Json(name = "updated_id") val updated_id: String,
    @Json(name = "id") val id: String
)

data class LoginInfo(
    @Json(name = "id") val id: Int,
    @Json(name = "user_name") val user_name: String,
    @Json(name = "nick_name") val nick_name: String,
    @Json(name = "score") val score: String,
    @Json(name = "avatar") val avatar: String,
    @Json(name = "position") val position: String,
    @Json(name = "labour") val labour: ArrayList<Labour>,
)


data class Labour(
    @Json(name = "id") val id: Int,
    @Json(name = "tel") val tel: String,
    @Json(name = "project_id") val project_id: String,
    @Json(name = "sex") val sex: String,
    @Json(name = "full_name") val full_name: String,
    @Json(name = "type") val type: String,
    @Json(name = "stauts") val stauts: String,
    @Json(name = "project") val project: ProjectLogin,
)

data class ProjectLogin(
    @Json(name = "id") val id: Int,
    @Json(name = "project_name") val project_name: String,
    @Json(name = "project_manager") val project_manager: String,
    @Json(name = "project_developers") val project_developers: String
)


//轮播图
data class Banner(
    @Json(name = "desc") val desc: String,
    @Json(name = "id") val id: Int,
    @Json(name = "imagePath") val imagePath: String,
    @Json(name = "isVisible") val isVisible: Int,
    @Json(name = "order") val order: Int,
    @Json(name = "title") val title: String,
    @Json(name = "type") val type: Int,
    @Json(name = "url") val url: String
)

// 登录数据
data class LoginData(
    @Json(name = "chapterTops") val chapterTops: MutableList<String>,
    @Json(name = "collectIds") val collectIds: MutableList<String>,
    @Json(name = "email") val email: String,
    @Json(name = "icon") val icon: String,
    @Json(name = "id") val id: Int,
    @Json(name = "password") val password: String,
    @Json(name = "token") val token: String,
    @Json(name = "type") val type: Int,
    @Json(name = "username") val username: String
)

data class CollectionResponseBody<T>(
    @Json(name = "current_page") val curPage: Int,
    @Json(name = "data") val datas: ArrayList<T>,
//    @Json(name = "offset") val offset: Int,
    @Json(name = "last_page") val over: Boolean,
    @Json(name = "per_page") val pageCount: Int,
//    @Json(name = "size") val size: Int,
    @Json(name = "total") val total: Int
)


data class CollectionArticle(
    @Json(name = "author") val author: String,
    @Json(name = "chapterId") val chapterId: Int,
    @Json(name = "chapterName") val chapterName: String,
    @Json(name = "courseId") val courseId: Int,
    @Json(name = "desc") val desc: String,
    @Json(name = "envelopePic") val envelopePic: String,
    @Json(name = "id") val id: Int,
    @Json(name = "link") val link: String,
    @Json(name = "niceDate") val niceDate: String,
    @Json(name = "origin") val origin: String,
    @Json(name = "originId") val originId: Int,
    @Json(name = "publishTime") val publishTime: Long,
    @Json(name = "title") val title: String,
    @Json(name = "userId") val userId: Int,
    @Json(name = "visible") val visible: Int,
    @Json(name = "zan") val zan: Int
)


data class ProjectUploadChooseBean(
    @Json(name = "name") val name: String,
    @Json(name = "isSelect") var isSelect: Boolean
)

data class ProjectDetailBean(
    @Json(name = "typename") val typename: String,
    @Json(name = "detail") val detail: List<ProjectDetailItemBean>
)

data class ProjectDetailItemBean(
    @Json(name = "name") val name: String,
    @Json(name = "namedis") val namedis: String
)

data class ProjectSignBean(
    @Json(name = "name") val name: String,
    @Json(name = "type") val type: String,
    @Json(name = "typedis") val typedis: String,
    @Json(name = "area") val area: String,
    @Json(name = "areadis") val areadis: String,
    @Json(name = "isSelect") var isSelect: Boolean
)